import http from '../utils/request'
export default{
    testRole403:function(data){
        return http.get('/role',data);
    },
    rolePager:function(data){
        return http.get('/roles',data);
    },
    roleList:function(){
        return http.get('/roles/all');
    },
    deleteRoles:function(ids){
        return http.delete('/role',{ids:ids});
    },
    getRole:function(id){
        return http.get(`/roles/${id}`);
    },
    updateRole:function(data){
        return http.put('/role',data);
    },
    addRole:function(data){
        return http.post('/role',data);
    },
    getRolePrivs:function(id){
        return http.get(`/roles/${id}/privs`);
    },
    updateRolePrivs:function(id,privs){
        return http.put(`/roles/${id}/privs`,{privileges:privs});
    },
}
